package com.wt.controller.model.base;

import java.io.Serializable;

public class ErrorModel implements Serializable {
    private static final long serialVersionUID = -1085309933708465186L;

    private boolean success = false;
    private String info = "操作失败";
    private Object result;
    private String code;

    public ErrorModel(String info,Object result) {
        this.info = info;
        this.result = result;
    }
    public ErrorModel(Object result) {
        this.result = result;
    }
    public ErrorModel(String info) {
        this.info = info;
    }
    public ErrorModel(String info,String code) {
        this.info = info;
        this.code = code;
    }
    public ErrorModel(String info,String code,Object result) {
        this.info = info;
        this.code = code;
        this.result = result;
    }

    public ErrorModel() {
    }

    public boolean isSuccess() {
        return success;
    }


    public String getInfo() {
        return info;
    }


    public Object getResult() {
        if(null == result) {
            return "";
        }
        return result;
    }
    public String getCode() {
        return code;
    }
}
